package org.tarasov.chapter2

/**
 * This source code free and open source
 * Author: Dmitriy Tarasov
 * Date: 04/04/11
 * Time: 23:11
 */
[1, 2, 3].each { entry -> println entry }

def totalClinks = 0
def partyPeople = 100
1.upto(partyPeople) { guestNumber ->
    clinksWithGuest = guestNumber - 1
    totalClinks += clinksWithGuest
}
assert totalClinks == (partyPeople * (partyPeople - 1)) / 2